import requests

response = requests.get("http://172.16.18.128/index.php?m=Home&c=User&a=verify")

# cookies1 为一个key-values的值，PHPSESSID=9ok9gcf2qfld8qqfar1158i1s3
print("查看cookies类型",response.cookies)
cookies1 = response.cookies.get("PHPSESSID")
print("cookies值为多少：",cookies1)

# 发请求
login_url = "http://172.16.18.128/index.php?m=Home&c=User&a=do_login"
# 表单form提交数据
login_data = {
    "username": "15988888888",
    "password": "yww123456",
    "verify_code": "8888" }
# login_cookie = requests
cookies = {
    "PHPSESSID": cookies1
}
# 看响应
response1 = requests.post(url=login_url, data=login_data, cookies=cookies)
print("返回response1的数据：",response1.json())

# 我的订单：http://localhost/Home/Order/order_list.html
response2 = requests.get("http://172.16.18.128/Home/Order/order_list.html",cookies=cookies)
print("订单返回的数据：",response2.text)